﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.IO.Compression;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using ParsecParser.Data;
using ParsecParser.Helpers;
using System.Collections.Concurrent;

namespace ParsecParser.Helpers
{
    public static class CombatLogHelpers
    {
        public static string XmlRegexPattern = "<[^<>]+>";
        public static string DigitsOrLetters = "^[a-zA-Z0-9]*$";
        public static string DigitsOrLettersOrSpaces = "^[a-zA-Z0-9]*[a-zA-Z0-9 ]*[a-zA-Z0-9]$";
        public static string MakePossessive(this string s)
        {
            if (string.IsNullOrEmpty(s))
                return s;
            string postFix = "'s";
            if (s.EndsWith(s))
                postFix = "'";
            return s + postFix;
        }
        public static string CapitalizeFirstLetter(this string word)
        {
            if (string.IsNullOrEmpty(word))
                return word;
            return word.ToCharArray()[0].ToString().ToUpper() + word.Substring(1);
        }
        public static string SerializeThis(this CombatDetails obj)
        {
            using (MemoryStream mems = new MemoryStream())
            {
                new BinaryFormatter().Serialize(mems, obj);
                return System.Text.Encoding.Default.GetString(mems.ToArray());
            }
        }
        public static string SerializeAndCompress<T>(this T obj, bool useBase64)
        {
            using (MemoryStream msCompressed = new MemoryStream())
            using (GZipStream gZipStream = new GZipStream(msCompressed, CompressionMode.Compress))
            using (MemoryStream msDecompressed = new MemoryStream())
            {
                new BinaryFormatter().Serialize(msDecompressed, obj);
                byte[] byteArray = msDecompressed.ToArray();

                gZipStream.Write(byteArray, 0, byteArray.Length);
                gZipStream.Close();
                if (useBase64)
                    return System.Convert.ToBase64String(msCompressed.ToArray());
                else
                    return System.Text.Encoding.Default.GetString(msCompressed.ToArray());
            }
        }
        public static string CompressString(this string obj, bool useBase64)
        {
            using (MemoryStream msCompressed = new MemoryStream())
            using (GZipStream gZipStream = new GZipStream(msCompressed, CompressionMode.Compress))
            using (MemoryStream msDecompressed = new MemoryStream())
            {
                byte[] byteArray = System.Text.Encoding.Unicode.GetBytes(obj.ToCharArray());
                gZipStream.Write(byteArray, 0, byteArray.Length);
                gZipStream.Close();
                if (useBase64)
                    return System.Convert.ToBase64String(msCompressed.ToArray());
                else
                    return System.Text.Encoding.Default.GetString(msCompressed.ToArray());
            }
        }
        public static T DecompressAndDeserialize<T>(this string obj, bool suppressFailureException, bool useBase64)
        {
            try
            {
                byte[] byteArray = useBase64 ? System.Convert.FromBase64String(obj) : System.Text.Encoding.Default.GetBytes(obj);
                using (MemoryStream msCompressed = new MemoryStream(byteArray))
                using (GZipStream gZipStream = new GZipStream(msCompressed, CompressionMode.Decompress))
                {
                    int size = 4096;
                    byte[] buffer = new byte[size];
                    using (MemoryStream msDecompressed = new MemoryStream())
                    {
                        int count = 0;
                        do
                        {
                            count = gZipStream.Read(buffer, 0, size);
                            if (count > 0)
                            {
                                msDecompressed.Write(buffer, 0, count);
                            }
                        }
                        while (count > 0);
                        byte[] result = msDecompressed.ToArray();
                        return (T)new BinaryFormatter().Deserialize(new MemoryStream(result));
                    }
                }
            }
            catch
            {
                if (suppressFailureException)
                    return default(T);
                else
                    throw;
            }
        }
        public static bool ContainsString(this string s1, string s2, bool skipHtml)
        {
            s1 = s1.NullToEmpty();
            s2 = s2.NullToEmpty();
            int resultStartIndex = s1.IndexOf(s2, StringComparison.OrdinalIgnoreCase);
            bool isFound = resultStartIndex >= 0;
            if (skipHtml)
            {
                Regex r = new Regex(XmlRegexPattern);
                string taglessS1 = r.Replace(s1, "");
                return taglessS1.IndexOf(s2, StringComparison.OrdinalIgnoreCase) >= 0;
            }
            else
                return isFound;
        }
        public static bool IsDigitsOrLetters(this string s)
        {
            Regex r = new Regex(DigitsOrLetters);
            return r.IsMatch(s);
        }
        public static bool IsDigitsOrLettersOrSpaces(this string s)
        {
            Regex r = new Regex(DigitsOrLettersOrSpaces);
            return r.IsMatch(s);
        }
        public static string NullToEmpty(this string source)
        {
            return source ?? string.Empty;
        }
        public static string EmptyToNull(this string source)
        {
            return source == string.Empty ? null : source;
        }
        public static string EncodeJsString(this string s)
        {
            if (s == null)
                s = string.Empty;
            StringBuilder sb = new StringBuilder();
            sb.Append("\"");
            foreach (char c in s)
            {
                switch (c)
                {
                    case '\"':
                        sb.Append("\\\"");
                        break;
                    case '\\':
                        sb.Append("\\\\");
                        break;
                    case '\b':
                        sb.Append("\\b");
                        break;
                    case '\f':
                        sb.Append("\\f");
                        break;
                    case '\n':
                        sb.Append("\\n");
                        break;
                    case '\r':
                        sb.Append("\\r");
                        break;
                    case '\t':
                        sb.Append("\\t");
                        break;
                    default:
                        int i = (int)c;
                        if (i < 32 || i > 127)
                        {
                            sb.AppendFormat("\\u{0:X04}", i);
                        }
                        else
                        {
                            sb.Append(c);
                        }
                        break;
                }
            }
            sb.Append("\"");

            return sb.ToString();
        }
        public static double GetThreatCoefficient(this CombatLogEntity ability, bool isGuarded)
        {
            switch (ability.EntityId)
            {
                case CombatLogConstants.Abilities.ImpeccableMedpacc:
                    return isGuarded ? .375 : .5;
                case CombatLogConstants.Abilities.PsychicSuffusion:
                    return isGuarded ? .375 : .5;
                case CombatLogConstants.Abilities.PreventativeMedicine:
                    return isGuarded ? .375 : .5;
                case CombatLogConstants.Abilities.PsychAid:
                    return isGuarded ? .375 : .5;
                case CombatLogConstants.Abilities.ForceArmor:
                    return isGuarded ? .375 : .5;
                case CombatLogConstants.Abilities.ForceBarrier:
                    return isGuarded ? .375 : .5;
                case CombatLogConstants.Abilities.AdrenalineRush:
                    return isGuarded ? .375 : .5;
                default:
                    return isGuarded ? .325 : .45;
            }
        }
        public static int CalculateEffectiveHeal(this CombatLogEntity ability, int amount, long threat, bool isGuarded)
        {
            if (threat == 0)
                return 0;
            else
            {
                int effectiveHeal = (int)Math.Ceiling((double)threat / ability.GetThreatCoefficient(isGuarded));
                if (effectiveHeal > amount)
                    return amount;
                else
                    return effectiveHeal;
            }
        }
        public static bool EffectIsGuard(this CombatLogEntity effect)
        {
            if (effect == null)
                return false;
            switch (effect.EntityId)
            {
                case CombatLogConstants.Guards.AssassinGuard:
                case CombatLogConstants.Guards.BountyHunterGuard:
                case CombatLogConstants.Guards.GuardianGuard:
                case CombatLogConstants.Guards.JuggernautGuard:
                case CombatLogConstants.Guards.ShadowGuard:
                case CombatLogConstants.Guards.VanguardGuard:
                    return true;
                default:
                    return false;
            }
        }
        public static bool IsCombatDroppedAbility(this CombatLogEntity ability)
        {
            if (ability == null)
                return false;
            switch (ability.EntityId)
            {
                case CombatLogConstants.CombatDropAbilities.DisappearingAct:
                case CombatLogConstants.CombatDropAbilities.ShadowForceCloak:
                case CombatLogConstants.CombatDropAbilities.AssassinForceCloak:
                case CombatLogConstants.CombatDropAbilities.CloakingScreen:
                    return true;
                default:
                    return false;
            }
        }
        public static bool IsResist(this CombatLogEntity mitigation)
        {
            if (mitigation == null)
                return false;
            switch (mitigation.EntityId)
            {
                case CombatLogConstants.Mitigation.Resist:
                    return true;
                default:
                    return false;
            }
        }
        public static bool MitigationIsDefense(this CombatLogEntity mitigation)
        {
            if (mitigation == null)
                return false;
            switch (mitigation.EntityId)
            {
                case CombatLogConstants.Mitigation.Dodge:
                case CombatLogConstants.Mitigation.Deflect:
                case CombatLogConstants.Mitigation.Miss:
                case CombatLogConstants.Mitigation.Parry:
                    return true;
                default:
                    return false;
            }
        }
        public static bool IsShieldAbility(this CombatLogEntity ability)
        {
            if (ability == null)
                return false;
            switch (ability.EntityId)
            {
                case CombatLogConstants.ShieldAbilities.ForceArmor:
                case CombatLogConstants.ShieldAbilities.StaticBarrier:
                    return true;
                default:
                    return false;
            }
        }
        public static bool IsShieldEffect(this CombatLogEntity effect)
        {
            if (effect == null)
                return false;
            switch (effect.EntityId)
            {
                case CombatLogConstants.ShieldAbilities.BladeBarrier:
                case CombatLogConstants.ShieldAbilities.SonicBarrier:
                    return true;
                default:
                    return false;
            }
        }
        public static bool IsBasicAttack(this CombatLogEntity ability)
        {
            if (ability == null)
                return false;
            switch (ability.EntityId)
            {
                case 947495555301376: //Inquisitor Saber Strike
                    return true;
                case 947486965366784: //Consular Saber Strike
                    return true;
                case 947362411315200: //Knight Strike
                    return true; 
                case 898601647603712: //Sorc Saber Strike
                    return true;
                case 801299163512832: //Hammer Shot
                    return true;
                case 814282849648640: //rapid shots
                    return true;
                case 948041016147968 : //rifle shot
                    return true;
                case 947955116802048: //flurry of bolts
                    return true;
                default:
                    return false;
            }
        }
        //public static int? GetFixedAttacksPerActivate(long abilityId)
        //{
        //    switch (abilityId)
        //    {
        //        case 947495555301376: //Inquisitor Saber Strike
        //            return 3;
        //        case 947486965366784: //Consular Saber Strike
        //            return 3;
        //        case 947362411315200: //Knight Strike
        //            return 3; //sentinel is 4!!
        //        case 898601647603712: //Sorc Saber Strike
        //            return 3;
        //        default:
        //            return null;
        //    }
        //}
        public static string TruncateText(this string source, int characterCount, string truncateAtLastIndexOf)
        {
            if (!string.IsNullOrEmpty(truncateAtLastIndexOf))
            {
                if (source.Length + 3 > characterCount)
                {
                    int indexOfTruncate = source.LastIndexOf(truncateAtLastIndexOf);
                    while (indexOfTruncate > characterCount)
                    {
                        indexOfTruncate = source.LastIndexOf(truncateAtLastIndexOf, indexOfTruncate - 1);
                    }
                    if (indexOfTruncate > 0)                    
                        return source.TruncateText(indexOfTruncate+3, true);
                }
            }
            return source.TruncateText(characterCount, true);
        }
        public static string TruncateText(this string source, int characterCount, bool truncateAtNewline)
        {
            string Elipsis = "...";
            return source.TruncateText(characterCount, truncateAtNewline, Elipsis);
        }
        public static string TruncateText(this string source, int characterCount, bool truncateAtNewline, string postFix)
        {
            if (string.IsNullOrEmpty(source))
                return source;
            else if (characterCount <= postFix.Length)
                return postFix;
            else
            {
                int truncatedLength = source.Length;
                int indexOfFirstNewLine = source.IndexOf(Environment.NewLine, 0);
                if (truncateAtNewline && indexOfFirstNewLine > 0)
                    truncatedLength = indexOfFirstNewLine + 1;
                if (truncatedLength > characterCount)
                    truncatedLength = characterCount - postFix.Length;
                if (truncatedLength == source.Length)
                    return source;
                else
                    return source.Substring(0, truncatedLength) + postFix;
            }
        }
        public static long GetEffectiveThreat(long currentThreat, long newThreat)
        {

            if (newThreat < 0 && Math.Abs(newThreat) > currentThreat)
                return -currentThreat;
            else
                return newThreat;
        }
        public static string ConvertThreatListToString(this IEnumerable<CombatLogParticipant> d)
        {
            string rval = null;
            if (d == null)
                return rval;
            //List<string> a = new List<string>();
            //int currentInsertCount = 0;
            //Dictionary<long, int> sortedD = d.OrderBy(x => x.Value).ToDictionary(x => x.Key, x => x.Value);
            //var keys = new List<long>(sortedD.Keys); 
            //foreach (long key in keys)
            //{
            //    if (GetRaidEncounterDetails(key).RaidEncounterId != 0 || currentInsertCount <= 5)
            //    {
            //        a.Add(key.ToString() + ":" + sortedD[key].ToString());
            //        currentInsertCount++;
            //    }
            //}
            //rval = string.Join(",", a.ToArray());

            rval = string.Join(",", d.Select(x => x.UniqueId.ToString() + ":" + x.TotalThreat.ToString()).ToArray());
            return string.IsNullOrEmpty(rval) ? null : rval;
        }
        public static Dictionary<string, CombatLogParticipant> ConvertToParticipantList(this string s)
        {
            Dictionary<string, CombatLogParticipant> rval = new Dictionary<string, CombatLogParticipant>();
            if (string.IsNullOrEmpty(s))
                return rval;
            try
            {
                string[] a = s.Split(',');
                foreach (string e in a)
                {
                    string[] e2 = e.Split(':');
                    long uid = 0;
                    long.TryParse(e2[0],out uid);
                    rval[e2[0]] = new CombatLogParticipant() { IsEnemy = true, TotalThreat = Convert.ToInt64(e2[1]), UniqueId = uid };
                }
            }
            catch
            {
                rval = new Dictionary<string, CombatLogParticipant>();
            }
            return rval;
        }
        public static RaidEncounterDetails GetRaidEncounterDetails(this CombatLogParticipant p)
        {
            return GetRaidEncounterDetails(p.EntityId);
        }
        public static RaidEncounterDetails GetRaidEncounterDetails(long entityId)
        {
            switch (entityId)
            {
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.AnnihilationDroidXRR3:
                    return new RaidEncounterDetails() { RaidEncounterId = 1, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Sixteen.AnnihilationDroidXRR3:
                    return new RaidEncounterDetails() { RaidEncounterId = 1, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Gharj:
                    return new RaidEncounterDetails() { RaidEncounterId = 2, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Puzzle_ProtoAcklay:
                    return new RaidEncounterDetails() { RaidEncounterId = 3, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_JaelTheSilencer:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_KaheshTheReborn:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_AlariiSisterOfSorrow:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_FahrenJajTheLaughingLord:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_LuthroTheKinslayer:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_SerrodTheMessenger:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_YshaarKaelBetrayerOfAdas:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Council_ZaheenKaurTheBowedLord:
                    return new RaidEncounterDetails() { RaidEncounterId = 4, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.BallLightning:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.MindTrap:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Eight.Soa:
                    return new RaidEncounterDetails() { RaidEncounterId = 5, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Sixteen.BallLightning:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Sixteen.MindTrap:
                case CombatLogConstants.RaidEncounters.EternalVault.HardMode.Sixteen.Soa:
                    return new RaidEncounterDetails() { RaidEncounterId = 5, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.Bonethrasher:
                    return new RaidEncounterDetails() { RaidEncounterId = 6, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.Sorno:
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.Jarg:
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.CarbonizerProbe:
                    return new RaidEncounterDetails() { RaidEncounterId = 7, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.ForemanCrusher:
                    return new RaidEncounterDetails() { RaidEncounterId = 8, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.SecurityStunDrone:
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.ProximityPulseMine:
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.G4B3HeavyFabricator:
                    return new RaidEncounterDetails() { RaidEncounterId = 9, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.ExplodingMouseDroid:
                case CombatLogConstants.RaidEncounters.KaraggasPalace.HardMode.Eight.KaraggaTheUnyielding:
                    return new RaidEncounterDetails() { RaidEncounterId = 10, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.Toth:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.Zorn:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.HandlerMurdok:
                    return new RaidEncounterDetails() { RaidEncounterId = 11, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.FirebrandBattleTank:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.StormcallerBlastTank:
                    return new RaidEncounterDetails() { RaidEncounterId = 12, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.ColonelVorgath:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.AutomatedDefenseTurret:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.ImperialDemolitionsProbe:
                    return new RaidEncounterDetails() { RaidEncounterId = 13, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.ImperialSiegeDroid:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.PulsarPowerDroid:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.TrandoshanTrenchcutter:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.TrandoshanWarrior:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.WarstriderBattlewalker:
                case CombatLogConstants.RaidEncounters.ExplosiveConflict.HardMode.Eight.WarlordKephess:
                    return new RaidEncounterDetails() { RaidEncounterId = 14, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.FoulOffspring:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.JealousMale:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.TheWrithingHorror:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.FoulOffspring:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.JealousMale:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.TheWrithingHorror:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.TwistedSpawn:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.FoulOffspring:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.JealousMale:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.TheWrithingHorror:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.FoulOffspring:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.JealousMale:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.TheWrithingHorror:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.TwistedSpawn:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.TheWrithingHorror_Other:
                    return new RaidEncounterDetails() { RaidEncounterId = 15, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.Kelsara:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.Ciphas:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.Heirad:
                    return new RaidEncounterDetails() { RaidEncounterId = 16, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.Kelsara:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.Ciphas:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.Heirad:
                    return new RaidEncounterDetails() { RaidEncounterId = 16, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.Kelsara:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.Ciphas:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.Heirad:
                    return new RaidEncounterDetails() { RaidEncounterId = 16, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.Kelsara:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.Ciphas:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.Heirad:
                    return new RaidEncounterDetails() { RaidEncounterId = 16, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.MasterControl:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.OperatorIX:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.Regulator:
                    return new RaidEncounterDetails() { RaidEncounterId = 17, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.MasterControl:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.OperatorIX:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.Regulator:
                    return new RaidEncounterDetails() { RaidEncounterId = 17, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.MasterControl:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.OperatorIX:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.Regulator:
                    return new RaidEncounterDetails() { RaidEncounterId = 17, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.MasterControl:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.OperatorIX:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.Regulator:
                    return new RaidEncounterDetails() { RaidEncounterId = 17, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.KephessTheUndying:
                    return new RaidEncounterDetails() { RaidEncounterId = 18, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.KephessTheUndying:
                    return new RaidEncounterDetails() { RaidEncounterId = 18, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.KephessTheUndying:
                    return new RaidEncounterDetails() { RaidEncounterId = 18, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.KephessTheUndying:
                    return new RaidEncounterDetails() { RaidEncounterId = 18, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.GraspingTentacle:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.TunnelingTentacleA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.TunnelingTentacleB:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.HypergateIrregularity:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.TheTerrorFromBeyondA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Eight.TheTerrorFromBeyondB:
                    return new RaidEncounterDetails() { RaidEncounterId = 19, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.GraspingTentacle:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.TunnelingTentacleA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.TunnelingTentacleB:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.HypergateIrregularity:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.TheTerrorFromBeyondA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.StoryMode.Sixteen.TheTerrorFromBeyondB:
                    return new RaidEncounterDetails() { RaidEncounterId = 19, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.GraspingTentacle:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.TunnelingTentacleA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.TunnelingTentacleB:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.HypergateIrregularity:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.TheTerrorFromBeyondA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Eight.TheTerrorFromBeyondB:
                    return new RaidEncounterDetails() { RaidEncounterId = 19, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.GraspingTentacle:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.TunnelingTentacleA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.TunnelingTentacleB:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.HypergateIrregularity:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.TheTerrorFromBeyondA:
                case CombatLogConstants.RaidEncounters.TerrorFromBeyond.HardMode.Sixteen.TheTerrorFromBeyondB:
                    return new RaidEncounterDetails() { RaidEncounterId = 19, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.StoryMode.Eight.GoldenFury:
                    return new RaidEncounterDetails() { RaidEncounterId = 20, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.StoryMode.Sixteen.GoldenFury:
                    return new RaidEncounterDetails() { RaidEncounterId = 20, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.HardMode.Eight.GoldenFury:
                    return new RaidEncounterDetails() { RaidEncounterId = 20, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.HardMode.Sixteen.GoldenFury:
                    return new RaidEncounterDetails() { RaidEncounterId = 20, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.PalaceSecurityDroid:
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.Isotope5A:
                case CombatLogConstants.RaidEncounters.ToborrosCourtyard.Isotope5B:
                    return new RaidEncounterDetails() { RaidEncounterId = 20, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.DashRoode:
                    return new RaidEncounterDetails() { RaidEncounterId = 21, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.DashRoode:
                    return new RaidEncounterDetails() { RaidEncounterId = 21, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.DashRoode:
                    return new RaidEncounterDetails() { RaidEncounterId = 21, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.DashRoode:
                    return new RaidEncounterDetails() { RaidEncounterId = 21, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.Titan6:
                    return new RaidEncounterDetails() { RaidEncounterId = 22, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.Titan6:
                    return new RaidEncounterDetails() { RaidEncounterId = 22, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.Titan6:
                    return new RaidEncounterDetails() { RaidEncounterId = 22, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.Titan6:
                    return new RaidEncounterDetails() { RaidEncounterId = 22, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.TitanProbe:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.RockShelter:
                    return new RaidEncounterDetails() { RaidEncounterId = 22, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.Thrasher:
                    return new RaidEncounterDetails() { RaidEncounterId = 23, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.Thrasher:
                    return new RaidEncounterDetails() { RaidEncounterId = 23, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.Thrasher:
                    return new RaidEncounterDetails() { RaidEncounterId = 23, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.Thrasher:
                    return new RaidEncounterDetails() { RaidEncounterId = 23, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.MercenarySniper:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.MercenaryDemolitionist:
                    return new RaidEncounterDetails() { RaidEncounterId = 23, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.RedTeamAssaultGunner:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.RedTeamFlametech:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.BlueTeamPackHunterA:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.BlueTeamPackHunterB:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.GreenTeamDuelist:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.GreenTeamPyroguard:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.GoldTeamMedtech:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.GoldTeamPyroguard:
                    return new RaidEncounterDetails() { RaidEncounterId = 24, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.OperationsChief:
                    return new RaidEncounterDetails() { RaidEncounterId = 25, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.OperationsChief:
                    return new RaidEncounterDetails() { RaidEncounterId = 25, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.OperationsChief:
                    return new RaidEncounterDetails() { RaidEncounterId = 25, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.OperationsChief:
                    return new RaidEncounterDetails() { RaidEncounterId = 25, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.RailTurret:
                    return new RaidEncounterDetails() { RaidEncounterId = 25, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.OlokTheShadow:
                    return new RaidEncounterDetails() { RaidEncounterId = 26, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.OlokTheShadow:
                    return new RaidEncounterDetails() { RaidEncounterId = 26, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.OlokTheShadow:
                    return new RaidEncounterDetails() { RaidEncounterId = 26, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.OlokTheShadow:
                    return new RaidEncounterDetails() { RaidEncounterId = 26, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.Bodyguard:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.WealthyBuyer:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.P2BAssaultDroid_1:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.P2BAssaultDroid_2:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.IA82ArtilleryDroid_1:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.MA9FrontlineDroid_1:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.MA9FrontlineDroid_2:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.PX7ReconDroid_1:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.PX7ReconDroid_2:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.OlokTheShadow_Other:
                    return new RaidEncounterDetails() { RaidEncounterId = 26, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.Tuchuk:
                    return new RaidEncounterDetails() { RaidEncounterId = 27, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.Tuchuk:
                    return new RaidEncounterDetails() { RaidEncounterId = 27, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.Tuchuk:
                    return new RaidEncounterDetails() { RaidEncounterId = 27, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.Tuchuk:
                    return new RaidEncounterDetails() { RaidEncounterId = 27, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.VilusGarr:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.CaptainHoric:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.Sunder:
                    return new RaidEncounterDetails() { RaidEncounterId = 27, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Eight.DreadMasterStyrak:
                    return new RaidEncounterDetails() { RaidEncounterId = 28, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.DreadMasterStyrakA:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.DreadMasterStyrakB:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.StoryMode.Sixteen.DreadMasterStyrakC:
                    return new RaidEncounterDetails() { RaidEncounterId = 28, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.DreadMasterStyrakA:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.DreadMasterStyrakB:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.DreadMasterStyrakC:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Eight.DreadMasterStyrakD:
                    return new RaidEncounterDetails() { RaidEncounterId = 28, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.DreadMasterStyrakA:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.DreadMasterStyrakB:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.HardMode.Sixteen.DreadMasterStyrakC:
                    return new RaidEncounterDetails() { RaidEncounterId = 28, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.ScumAndVillany.DreadGuard:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.DreadGuardOfficer:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.KellDragonA:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.KellDragonB:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.DreadMasterStyrak_Other1:
                case CombatLogConstants.RaidEncounters.ScumAndVillany.DreadMasterStyrak_Other2:
                    return new RaidEncounterDetails() { RaidEncounterId = 28, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Eight.NefraWhoBlocksTheWay:
                    return new RaidEncounterDetails() { RaidEncounterId = 29, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Sixteen.NefraWhoBlocksTheWay:
                    return new RaidEncounterDetails() { RaidEncounterId = 29, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Eight.NefraWhoBlocksTheWay:
                    return new RaidEncounterDetails() { RaidEncounterId = 29, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Sixteen.NefraWhoBlocksTheWay:
                    return new RaidEncounterDetails() { RaidEncounterId = 29, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Eight.GateCommanderDraxus:
                    return new RaidEncounterDetails() { RaidEncounterId = 30, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Sixteen.GateCommanderDraxus:
                    return new RaidEncounterDetails() { RaidEncounterId = 30, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Eight.GateCommanderDraxus:
                    return new RaidEncounterDetails() { RaidEncounterId = 30, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Sixteen.GateCommanderDraxus:
                    return new RaidEncounterDetails() { RaidEncounterId = 30, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Eight.GrobThrokWhoFeedsTheForge:
                    return new RaidEncounterDetails() { RaidEncounterId = 31, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Sixteen.GrobThrokWhoFeedsTheForge:
                    return new RaidEncounterDetails() { RaidEncounterId = 31, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Eight.GrobThrokWhoFeedsTheForge:
                    return new RaidEncounterDetails() { RaidEncounterId = 31, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Sixteen.GrobThrokWhoFeedsTheForge:
                    return new RaidEncounterDetails() { RaidEncounterId = 31, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Eight.CorruptorZero:
                    return new RaidEncounterDetails() { RaidEncounterId = 32, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Sixteen.CorruptorZero:
                    return new RaidEncounterDetails() { RaidEncounterId = 32, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Eight.CorruptorZero:
                    return new RaidEncounterDetails() { RaidEncounterId = 32, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Sixteen.CorruptorZero:
                    return new RaidEncounterDetails() { RaidEncounterId = 32, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Eight.DreadMasterBrontes:
                    return new RaidEncounterDetails() { RaidEncounterId = 33, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.HardMode.Sixteen.DreadMasterBrontes:
                    return new RaidEncounterDetails() { RaidEncounterId = 33, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Eight.DreadMasterBrontes:
                    return new RaidEncounterDetails() { RaidEncounterId = 33, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadFortress.StoryMode.Sixteen.DreadMasterBrontes:
                    return new RaidEncounterDetails() { RaidEncounterId = 33, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadFortress.HandOfBrontes1:
                case CombatLogConstants.RaidEncounters.DreadFortress.HandOfBrontes2:
                case CombatLogConstants.RaidEncounters.DreadFortress.FingerOfBrontes1:
                case CombatLogConstants.RaidEncounters.DreadFortress.FingerOfBrontes2:
                case CombatLogConstants.RaidEncounters.DreadFortress.FingerOfBrontes3:
                case CombatLogConstants.RaidEncounters.DreadFortress.LeftHandOfBrontes:
                case CombatLogConstants.RaidEncounters.DreadFortress.RightHandOfBrontes:
                case CombatLogConstants.RaidEncounters.DreadFortress.HandOfBrontes:
                case CombatLogConstants.RaidEncounters.DreadFortress.CorruptedClone:
                    return new RaidEncounterDetails() { RaidEncounterId = 33, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadMasterBestia:
                    return new RaidEncounterDetails() { RaidEncounterId = 34, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadMasterTyrans:
                    return new RaidEncounterDetails() { RaidEncounterId = 35, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadMasterCalphayus1:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadMasterCalphayus2:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadMasterCalphayus3:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadMasterCalphayus4:
                    return new RaidEncounterDetails() { RaidEncounterId = 36, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.DreadPalace.HardMode.Eight.DreadMasterRaptus:
                    return new RaidEncounterDetails() { RaidEncounterId = 37, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadPalace.HardMode.Sixteen.DreadMasterRaptus:
                    return new RaidEncounterDetails() { RaidEncounterId = 37, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadPalace.StoryMode.Eight.DreadMasterRaptus:
                    return new RaidEncounterDetails() { RaidEncounterId = 37, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.DreadPalace.StoryMode.Sixteen.DreadMasterRaptus:
                    return new RaidEncounterDetails() { RaidEncounterId = 37, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadCouncilBestia:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadCouncilTyrans:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadCouncilCalphayus:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadCouncilRaptus:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadCouncilBrontes:
                case CombatLogConstants.RaidEncounters.DreadPalace.DreadCouncilStyrak:
                    return new RaidEncounterDetails() { RaidEncounterId = 38, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                case CombatLogConstants.RaidEncounters.OperationsTrainingDummy:
                    return new RaidEncounterDetails() { RaidEncounterId = 39, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };//Sparky
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Eight.Sparky:
                    return new RaidEncounterDetails() { RaidEncounterId = 40, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Sixteen.Sparky:
                    return new RaidEncounterDetails() { RaidEncounterId = 40, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Eight.Sparky:
                    return new RaidEncounterDetails() { RaidEncounterId = 40, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Sixteen.Sparky:
                    return new RaidEncounterDetails() { RaidEncounterId = 40, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                //Bulo
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Eight.Bulo:
                    return new RaidEncounterDetails() { RaidEncounterId = 41, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Sixteen.Bulo:
                    return new RaidEncounterDetails() { RaidEncounterId = 41, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Eight.Bulo:
                    return new RaidEncounterDetails() { RaidEncounterId = 41, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Sixteen.Bulo:
                    return new RaidEncounterDetails() { RaidEncounterId = 41, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                //Torque
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Eight.Torque:
                    return new RaidEncounterDetails() { RaidEncounterId = 42, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Sixteen.Torque:
                    return new RaidEncounterDetails() { RaidEncounterId = 42, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Eight.Torque:
                    return new RaidEncounterDetails() { RaidEncounterId = 42, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Sixteen.Torque:
                    return new RaidEncounterDetails() { RaidEncounterId = 42, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                //Blaster
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Eight.Blaster:
                    return new RaidEncounterDetails() { RaidEncounterId = 43, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.StoryMode.Sixteen.Blaster:
                    return new RaidEncounterDetails() { RaidEncounterId = 43, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Eight.Blaster:
                    return new RaidEncounterDetails() { RaidEncounterId = 43, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TheRavagers.HardMode.Sixteen.Blaster:
                    return new RaidEncounterDetails() { RaidEncounterId = 43, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                //Cortanni
                case CombatLogConstants.RaidEncounters.TheRavagers.Cortanni:
                case CombatLogConstants.RaidEncounters.TheRavagers.Pearl:
                    return new RaidEncounterDetails() { RaidEncounterId = 44, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                //Malalphar
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.StoryMode.Eight.Malaphar:
                    return new RaidEncounterDetails() { RaidEncounterId = 45, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.StoryMode.Sixteen.Malaphar:
                    return new RaidEncounterDetails() { RaidEncounterId = 45, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HardMode.Eight.Malaphar:
                    return new RaidEncounterDetails() { RaidEncounterId = 45, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HardMode.Sixteen.Malaphar:
                    return new RaidEncounterDetails() { RaidEncounterId = 45, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                //Shield Squadron
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.StoryMode.Eight.Walker1:
                    return new RaidEncounterDetails() { RaidEncounterId = 46, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.StoryMode.Sixteen.Walker1:
                    return new RaidEncounterDetails() { RaidEncounterId = 46, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HardMode.Eight.Walker1:
                    return new RaidEncounterDetails() { RaidEncounterId = 46, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HardMode.Sixteen.Walker1:
                    return new RaidEncounterDetails() { RaidEncounterId = 46, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                //Underlurker
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.StoryMode.Eight.Underlurker:
                    return new RaidEncounterDetails() { RaidEncounterId = 47, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.StoryMode.Sixteen.Underlurker:
                    return new RaidEncounterDetails() { RaidEncounterId = 47, Mode = RaidEncounterDetails.DifficultyMode.StoryMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HardMode.Eight.Underlurker:
                    return new RaidEncounterDetails() { RaidEncounterId = 47, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Eight };
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HardMode.Sixteen.Underlurker:
                    return new RaidEncounterDetails() { RaidEncounterId = 47, Mode = RaidEncounterDetails.DifficultyMode.HardMode, Players = RaidEncounterDetails.PlayerCount.Sixteen };

                //Revanite commanders
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.Deron:
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.Sano:
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.Kurse:
                    return new RaidEncounterDetails() { RaidEncounterId = 48, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };

                //Revan
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.Revan:
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.HK47:
                case CombatLogConstants.RaidEncounters.TempleOfSacrifice.MachineFocus:
                    return new RaidEncounterDetails() { RaidEncounterId = 49, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
                default:
                    return new RaidEncounterDetails() { RaidEncounterId = 0, Mode = RaidEncounterDetails.DifficultyMode.Unknown, Players = RaidEncounterDetails.PlayerCount.Unknown };
            }
        }
    }
}
